package com.itheima.controller;


import com.itheima.common.R;
import com.itheima.manager.UmsAdminManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
public class UmsAdminController {
    @Autowired
    UmsAdminManager umsAdminManager;
    @PostMapping("/admin/login")
    public R<Map<String,String>> login(@RequestBody Map<String,String> map){
        return umsAdminManager.login(map);
    }

    @GetMapping("/admin/info")
    public R<Map<String,Object>> findAdminInfo(@RequestParam(required = false) String name){
        return umsAdminManager.findAdminInfo(name);
    }
}
